function [CNC_state,ask_list,ask_list2]=asklist(CNC_state,ask_list,ask_list2,CNC_swork,lop)
CNC_workall=[[400,378];[280,500];[455,122]];
CNC_work=CNC_workall(lop,:);
ask_list=[];
ask_list2=[];
    for i=1:4
       if CNC_swork(i)
           if (CNC_state(i)-CNC_work(1))>= 0 
              ask_list=[ask_list,i];             
           end
       else
           CNC_state(i)=0;
           ask_list=[ask_list,i];
       end
    end
    for i=5:8
        if CNC_swork(i)
           if (CNC_state(i)-CNC_work(2))>= 0 
              ask_list2=[ask_list2,i];     
           end
       else
           CNC_state(i)=0;
           ask_list2=[ask_list2,i];
        end
    end
end